Skip to content

Expose user agent and pass header through in requests #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

technige
Copy link
Contributor

No description provided.

@technige technige requested a review from swallez October 12, 2021 15:40

@Test
public void testDefaultUserAgent() throws Exception {
RestClient restClient = RestClient.builder(new HttpHost("localhost", 9200)).build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive by nit (hi 👋): IIRC the rest client starts a threadpool with every invocation and is Closeable. Maybe start the client only once for the whole test and make sure it is closed after?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi back :)

Yes, that seems like good advice. Given this is my first foray into this code base, I was just about to ping @swallez for his thoughts; I'll add this to the list for discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spinscale WDYT of the latest commit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 (as long as we don't have mockito as a dependency ;-) - I also opened #33 as a discussion to prevent such issues in the future, but that depends if we want to use junit jupiter in the future I guess

@technige technige closed this Oct 14, 2021
@technige technige deleted the user-agent branch October 14, 2021 08:33
@technige
Copy link
Contributor Author

Closing PR and reopening as #35 for all telemetry changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants